//用户相关api接口
import request from '@/utils/requiest'
//因为cart所有内容都需要token验证
//所以我们在请求拦截器书写token验证

//1.加入购物车
export const addCartApi =(userid:string,proid:string,num?:number = 1)=> request.post('/cart/add',{
  userid,proid,num: num || 1
})
// 2.获取购物车列表
export const getCartListApi = (userid:string)=> request.post('/cart/list',{userid})
//3.修改每一条的选中状态
export const updateStatusApi = (cartid: string,flag:boolean)=> request.post('/cart/selectone',{cartid,flag})